Publish to npm on tag push via trusted publishing (OIDC) - #1048
Merged
Conversation
dev-milos
marked this pull request as ready for review
July 24, 2026 11:42
Greptile SummaryIntroduces automated trusted npm publishing for the scoped root package.
Confidence Score: 5/5The PR appears safe to merge with no blocking failures remaining in the fixes relevant to the previous review threads. The scoped package metadata, lockfile, release verification, and reporting targets are now consistent, and no blocking failure remains. Important Files Changed
Sequence DiagramsequenceDiagram
participant M as Maintainer
participant GH as GitHub
participant CI as release-publish.yml
participant NPM as npm Registry
M->>GH: "Push signed v<version> tag"
GH->>CI: Trigger tag workflow
CI->>CI: Verify tag matches package.json
CI->>CI: npm ci and prepublishOnly build
CI->>NPM: npm publish via OIDC with provenance
NPM-->>CI: "Publish @gresearch/bobbit"
CI-->>M: Workflow result
Reviews (3): Last reviewed commit: "Merge master into ci/release-publish-wor..." | Re-trigger Greptile |
Adds .github/workflows/release-publish.yml: on a v* tag push it builds and publishes the root bobbit package to npm using trusted publishing (OIDC) with automatic provenance -- no NPM_TOKEN, no OTP. Mirrors the validated gr-oss-developers/trusted-publishing-demo workflow (top-level id-token: write, Node 24 for npm >= 11.5.1, npm publish --provenance), plus the two things bobbit needs that the demo doesn't: npm ci (bobbit has deps; the build runs via the existing prepublishOnly hook) and a tag-vs-package.json-version guard. package.json gains repository/homepage/bugs. repository is required for provenance -- its URL must resolve to the building repo -- and was absent, which is why the runbook's manual `npm publish --provenance` never actually produced an attestation. Runbook (SKILL.md + docs/releasing.md) now delegates the root publish to CI: the human bumps the version, writes notes, signs the tag, and pushes it; the tag push triggers the publish. npm login/OTP is scoped to the binary sub-package republish case (still manual). Also fixes a stale SuuBro/bobbit reference to G-Research/bobbit. The root publish is not exercisable from a fork -- the npm trusted-publisher is bound to the G-Research/bobbit repo identity. Validated here: actionlint clean, npm publish --dry-run packs on Node 24, guard logic, and the JSON/YAML parse. Manual prerequisites (npm admin, not code): configure the trusted publisher on npmjs.com for bobbit -> G-Research/bobbit -> release-publish.yml. bobbit already exists on npm (0.14.2), so no manual first publish is needed.
A v* tag with a semver pre-release suffix (v1.0.0-rc.1, v0.15.0-beta) now publishes to the `next` dist-tag instead of `latest`, so a pre-release cannot become the version `npm install bobbit` resolves. Stable tags still go to `latest`.
Publish under the @gresearch npm org: sets name to @gresearch/bobbit and adds publishConfig.access public (scoped packages default to restricted). Updates the package-lock.json root name to match. The bin command stays `bobbit`. This is a new scoped package on npm, so its first publish is a manual bootstrap before trusted publishing takes over.
dev-milos
force-pushed
the
ci/release-publish-workflow
branch
from
July 27, 2026 08:49
cbc0d21 to
15bf853
Compare
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
| ); | ||
| assert.doesNotMatch(skill, /npm install bobbit@/); | ||
| assert.doesNotMatch(skill, /import\('bobbit\//); | ||
| assert.doesNotMatch(skill, /npmjs\.com\/package\/bobbit\//); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Move Bobbit to automated, secure npm releases and migrate the root package to
@gresearch/bobbit.Changes
.github/workflows/release-publish.yml— a pushedv*tag validates the package version, installs dependencies, and publishes through npm trusted publishing with provenance. Stable versions uselatest; prereleases usenext.package.json/package-lock.json— rename the root package to@gresearch/bobbit, make the scoped package public, and add repository metadata required for provenance.@gresearch/bobbit.Scope: root package only. Binary sub-packages, version bumps, notes, signed tags, and GitHub Releases keep their existing flow. User-facing installation instructions can continue referencing
bobbitduring the migration period.Activation sequence
@gresearch/bobbitis a new scoped package. After this PR merges:@gresearch/bobbitpublication as the one-time exception to normal CI-only publishing.G-Research, repobobbit, workflowrelease-publish.yml.The unscoped
bobbitpackage remains available during the transition; this PR does not dual-publish both identities.Validation
master.npm cisucceeds and reports zero vulnerabilities.G-Research/bobbit.🤖 Generated with Bobbit